<%--
    Document   : index
    Created on : Feb 8, 2012, 11:05:34 PM
    Author     : Alex
--%>

<%@page import="java.util.ArrayList"%>
<%@page import="bean.ExamMark"%>
<%@page import="javax.swing.text.html.HTMLDocument.Iterator"%>
<%@page import="bean.ExamMarkBean"%>
<%@page import="java.util.Collection"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h3>MARK</h3>
        <table border="1" cellpadding="4" >
            <tr>
                <th>Student ID</th>
                <th>Student Name</th>
                <th>Subject Name</th>
                <th>Date</th>
                <th>Mark</th>
                <th>Status</th>
            </tr>
            <%
                        ExamMarkBean exam = new ExamMarkBean();
                        try {
                            ArrayList<ExamMark> AL = exam.getListExamMark();
                            //request.setAttribute("listmark", co);
                            for (ExamMark e : AL) {
            %>
            <tr>
                <td><%=e.getStuId()%></td>
                <td><%=e.getStuName()%></td>
                <td><%=e.getSuName()%></td>
                <td><%=e.getMaDate()%></td>
                <td><%=e.getMaMark()%></td>
                <td><%
                     int a=e.getMaMark();
                     if(a<10)
                     {%>
                        Fail
                     <%}
                     else
                     {%>
                        Pass
                     <%}
                        %></td>
            </tr>

            <%                            }
                        } catch (Exception ex) {
                        }
            %>


        </table>
    </body>
</html>
